<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:cc="http://java.sun.com/jsf/composite"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:p="http://primefaces.org/ui"
      xmlns:x="http://xpert.com/faces"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:ui="http://java.sun.com/jsf/facelets">

    <!-- INTERFACE -->
    <cc:interface>
        <cc:attribute name="target"/>
        <cc:attribute name="export" type="java.lang.Boolean" default="true"/>
        <cc:attribute name="options" type="java.lang.Boolean" default="true"/>
        <cc:attribute name="fileName"/>
        <cc:attribute name="widgetVar"/>
    </cc:interface>

    <!-- IMPLEMENTATION -->
    <cc:implementation>

        <div class="uix-table-actions" id="#{cc.attrs.clientId}" rendered="#{cc.attrs.options}">
            <p:menuButton value="#{xmsg['options']}">
                <p:menuitem value="#{xmsg['refresh']}" onclick="#{xpert.normalizePrimeFacesWidget(cc.attrs.widgetVar)}.filter();" icon="ui-icon-refresh" url="#"/>
                <p:menuitem value="#{xmsg['clearFilters']}" onclick="#{xpert.normalizePrimeFacesWidget(cc.attrs.widgetVar)}.clearFilters();" icon="ui-icon-close" url="#"/>
            </p:menuButton>
            <x:dataTableExporter rendered="#{cc.attrs.export}" target="#{cc.attrs.target}" fileName="#{cc.attrs.fileName}"/>
        </div>

    </cc:implementation>
</html>